package com.task.controller;


import com.task.bean.Rank;
import com.task.service.IRankService;
import com.task.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liuzhe
 * @since 2021-04-10
 */
@RestController
@RequestMapping("/rank")
public class RankController {

    @Autowired
    private IRankService rankService;

    @GetMapping("/list")
    public ResultVo list() {
        return ResultVo.success(rankService.queryNameAndRankOrderByRank());
    }
}

